🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / database / src / commonMain / kotlin / org / meshtastic / core / database / entity / MergeMarkerEntity.kt
Displaying Raw • Download
core/database/src/commonMain/kotlin/org/meshtastic/core/database/entity/MergeMarkerEntity.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.86 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.database.entity
Tff7b72import T7ee787androidx.room3.ColumnInfo
Tff7b72import T7ee787androidx.room3.Entity
Tff7b72import T7ee787androidx.room3.PrimaryKey
T8b949e/**
* A durable record, in the canonical (destination) database, that a given source database has already been folded in by
* [org.meshtastic.core.database.DatabaseMerger]. Written inside the same merge transaction as the copied rows, so it
* commits atomically with them. When [org.meshtastic.core.database.DatabaseManager.associateDevice] re-runs the merge
* on the next connection, `DatabaseMerger.merge` finds the marker at the top of its transaction and skips the whole
* merge — closing the crash window between the merge commit and the datastore alias write, where a retry would
* otherwise duplicate the fresh-id packet/discovery rows. Markers share the destination DB's lifecycle: if the
* canonical DB is LRU-evicted and later recreated empty, its markers vanish with the merged data they describe.
*/
Tf0883e@EntityTb4b4b4(Te6edf3tableName Tff7b72= Ta5d6ff"Ta5d6ffmerge_markerTa5d6ff"Tb4b4b4)
Tff7b72data Tff7b72class T56d364MergeMarkerEntityTb4b4b4(
Tf0883e@PrimaryKey Tf0883e@ColumnInfoTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffsource_db_nameTa5d6ff"Tb4b4b4) Tff7b72val Te6edf3sourceDbNameTb4b4b4: Tffa657StringTb4b4b4,
Tf0883e@ColumnInfoTb4b4b4(Te6edf3name Tff7b72= Ta5d6ff"Ta5d6ffmerged_atTa5d6ff"Tb4b4b4) Tff7b72val Te6edf3mergedAtTb4b4b4: Tffa657Long Tff7b72= T79c0ff0LTb4b4b4,
Tb4b4b4)
Served by rngit 1.5.0 - Generated in 0.04s